const url=require("url")
var obj=url.parse("https://www.baidu.com/s?ie=utf-8&f=3&rsv_bp=1&rsv_idx=1&tn=93153557_hao_pg&wd=nodejs%E6%95%99%E7%A8%8Burl&oq=nodejs%25E6%2595%2599%25E7%25A8%258B&rsv_pq=e93904ed00015554&rsv_t=42b1mjCH9QsJJIh8%2BPlDlSbXWZ8pf06dScdxBDs3X8XzHFgbSlUzOkNykCV8KNaI4AEU9Q%2B6&rqlang=cn&rsv_enter=1&inputT=898&rsv_sug3=23&rsv_sug1=27&rsv_sug7=100&rsv_sug2=0&rsv_sug4=2656")
console.log(obj)
var str=url.format(obj)
console.log(str)